package com.evil.log.pojo.entiy;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 请求日志表
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@TableName(value = "evil_request_log")
public class RequestLog implements Serializable {

    /**
     * id
     */
    @TableId(value = "request_log_id", type = IdType.AUTO)
    private Long requestLogId;

    /**
     * 服务id
     */
    @TableField(value = "service_id")
    private String serviceId;

    /**
     * 服务器host
     */
    @TableField(value = "server_host")
    private String serverHost;

    /**
     * 服务器ip
     */
    @TableField(value = "server_ip")
    private String serverIp;

    /**
     * 系统环境
     */
    @TableField(value = "env")
    private String env;

    /**
     * 请求uri
     */
    @TableField(value = "request_uri")
    private String requestUri;

    /**
     * 请求url
     */
    @TableField(value = "request_url")
    private String requestUrl;

    /**
     * 请求方法
     */
    @TableField(value = "request_method")
    private String requestMethod;

    /**
     * 请求参数
     */
    @TableField(value = "request_params")
    private String requestParams;

    /**
     * 请求body
     */
    @TableField(value = "request_body")
    private String requestBody;

    /**
     * 操作ip
     */
    @TableField(value = "client_ip")
    private String clientIp;

    /**
     * 用户代理
     */
    @TableField(value = "user_agent")
    private String userAgent;

    /**
     * 日志描述
     */
    @TableField(value = "description")
    private String description;

    /**
     * 操作时间
     */
    @TableField(value = "`time`")
    private Date time;

    /**
     * 创建人
     */
    @TableField(value = "creator_id")
    private Long creatorId;

    /**
     * 创建人名字
     */
    @TableField(value = "creator_name")
    private String creatorName;

    /**
     * 创建时间
     */
    @TableField(value = "created")
    private Date created;

    private static final long serialVersionUID = 1L;

    public static final String COL_REQUEST_LOG_ID = "request_log_id";

    public static final String COL_SERVICE_ID = "service_id";

    public static final String COL_SERVER_HOST = "server_host";

    public static final String COL_SERVER_IP = "server_ip";

    public static final String COL_ENV = "env";

    public static final String COL_REQUEST_URI = "request_uri";

    public static final String COL_REQUEST_URL = "request_url";

    public static final String COL_REQUEST_METHOD = "request_method";

    public static final String COL_REQUEST_PARAMS = "request_params";

    public static final String COL_REQUEST_BODY = "request_body";

    public static final String COL_CLIENT_IP = "client_ip";

    public static final String COL_USER_AGENT = "user_agent";

    public static final String COL_DESCRIPTION = "description";

    public static final String COL_TIME = "time";

    public static final String COL_CREATOR_ID = "creator_id";

    public static final String COL_CREATOR_NAME = "creator_name";

    public static final String COL_CREATED = "created";
}